import request from '@/utils/request.js';
import httpConfig from '@/config/http.js'

export default {
	login: code => {
		return request({
			url: '/login',
			method: httpConfig.METHODS.GET,
			data: { code }
		})
	},
	findOne: userId => {
		return request({
			url: '/user/findOne',
			method: httpConfig.METHODS.GET,
			data: { userId }
		})
	},
	save: data => {
		return request({
			url: '/user/save',
			method: httpConfig.METHODS.POST,
			data
		})
	},
}